package com.llmops.demo.code;

import dev.langchain4j.code.CodeExecutionEngine;
import dev.langchain4j.code.graalvm.GraalVmJavaScriptExecutionEngine;
import dev.langchain4j.code.graalvm.GraalVmPythonExecutionEngine;

public class GraalVmJavaScriptExecutionEngineTest {



    static void should_execute_code() {

//        String code = """
//                def add(a, b):
//                 return a + b;
//                def main(a, b):
//                 return a + b;
//                """;
//        String call = "main(%s,%s)";
//        code = code+System.lineSeparator()+String.format(call,1,2);
//        CodeExecutionEngine engine = new GraalVmPythonExecutionEngine();
//        String result = engine.execute(code);
//        System.out.println(result);
    }

    public static void main(String[] args) {
        should_execute_code();
    }
}
